package com.imooc.service;

import com.imooc.bean.AuthResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author 14048
 * @Date 2022/1/14 17:18
 */
@FeignClient("auth-service")
public interface AuthService {

    @PostMapping("/login")
    @ResponseBody
    public AuthResponse login(@RequestParam("username")String username,
                              @RequestParam("pwd")String pwd);
    @GetMapping("/verify")
    @ResponseBody
    public AuthResponse verify(@RequestParam("token")String token,
                               @RequestParam("username")String username);
    @PostMapping("/refresh")
    @ResponseBody
    public AuthResponse refresh(@RequestParam("refresh")String refresh);



}
